package main

import "fmt"

func main(){
    fmt.Printf("请输入要计算的类型:")
    var TYPE, num1, num2, result int 
    
    fmt.Scanf("%d", &TYPE)
    fmt.Printf("请输入计算数字：")
    fmt.Scanf("%d",&num1)
    fmt.Printf("请输入计算数字：")
    fmt.Scanf("%d",&num2)




    
    switch TYPE {
        case 1:
            result = add(num1, num2)
            break
        case 2:
            result = div(num1, num2)
            break
    }

    fmt.Printf("结果：%d\n",result)
}


func add(a, b int) int {
    return a + b
}


func div(a, b int) int {
    return a / b
}
